package chapter3;
import java.util.Scanner;
/****************************************************************
 * Author：icynlau
 * Description:  || && ^(异或 )练习
 * Date:2021/4/1
 * ***************************************************************
 */
public class exc3_26 {
	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		System.out.print("Enter an integer:  ");
		int n=input.nextInt();
		
//		boolean b1=false;
//		boolean b2=false;
//		boolean b3=false;
//		if(n%5==0&&n%6==0) {
//			b1=true;
//		}
//		if(n%5==0||n%6==0){
//			b2=true;
//		}
//		if(n%5==0^n%6==0){
//			b3=true;
//		}
		//上面几步画蛇添足了，我们可以直接按照下面这么写
		System.out.println("Is "+n+" divisible by 5 and 6?   "+(n%5==0&&n%6==0) );
		System.out.println("Is "+n+" divisible by 5 or 6?  "+(n%5==0||n%6==0) );
		System.out.println("Is "+n+" divisible by 5 or 6,and not both?  "+(n%5==0^n%6==0) );
		
		
		
		
		
	}

}
